package apitest;

import com.github.crab2died.ExcelUtils;
import lombok.SneakyThrows;
import org.apache.commons.lang3.StringUtils;

import java.io.File;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;

public class ApiTest {

  public static String fileDir =System.getProperty("user.dir")+ File.separator+"data"+File.separator;
    @SneakyThrows
    public static void main(String[] args) {
        String filePath =fileDir+"apitest.xlsx";
        List<TestCase> list = ExcelUtils.getInstance().readExcel2Objects(filePath, TestCase.class);  //反射

        List<TestCase> collect = list.stream().filter(d -> d.getRun().equals("是")).
                sorted(Comparator.comparing(TestCase::getOrder)).collect(Collectors.toList());

        collect.forEach(d-> System.out.println(d));
        System.out.println("1111");
    }
}
